package com.gnerv.cms.dto;

import com.gnerv.cms.entity.User;
import lombok.Data;
import org.springframework.beans.BeanUtils;

import java.util.List;

/**
 * 基础平台-用户添加 DTO
 *
 * @author zhang
 * @date 2019/11/30
 **/
@Data
public class PersonalDTO extends BaseDTO {

    private String ukId;
    private String account;
    private String username;

    private String org;
    private List<String> roles;

    private UserInfoDTO userInfo = new UserInfoDTO();

    public User convert() {
        User user = new User();
        BeanUtils.copyProperties(this, user);
        return user;
    }


}
